In order to effectively transmit or record a moving image, there have been employed a moving image encoding device (encoding device) configured to generate encoded data by encoding the moving image, and a moving image decoding device (decoding device) configured to generate a decoded image by decoding this encoded data. Examples of a specific moving image coding system include H.264/MPEG-4.AVC (NPL 1), a system employed by KTA software which is codec for joint development in VCEG (Video Coding Expert Group), and a system (NPL 2) to be employed by TMuC (Test Model under Consideration) software which is a succeeding codec.
With such a coding system, an image (picture) making up a moving image is managed by a layered structure made up of slices to be obtained by dividing an image, the maximum coding increment (LCU: Largest Coding Unit) to be obtained by dividing a slice, and coding increment (CU: Coding Unit) to be obtained by dividing a largest coding unit, a block and a partition to be obtained by dividing a coding unit, and in many cases, encoding is performed with a block as the minimum unit.
Also, with such a coding system, in general, a predicted image is generated based on a local decoded image to be obtained by encoding/decoding an input image, and a difference image (may also referred to as residual image or predicted residual) between this predicted image and an input image is encoded. Also, as a method for generating a predicted image, there has been known a method called inter-frame prediction (inter prediction) and intra-screen prediction (intra prediction).
With inter prediction, motion compensation using a motion vector is applied to a reference image within a reference frame (decoded image) of which the entire frame has been decoded, and accordingly, a predicted image within a prediction target frame is generated for each prediction unit. On the other hand, with intra prediction, based on a local decoded image within the same frame, a predicted image in this frame is sequentially generated.
With NPL 2, an adaptive loop filter (ALF: Adaptive Loop Filter) (hereinafter, also simply referred to as “adaptive filter”) configured to perform filter processing on a decoded image for each coding unit has been disclosed. This adaptive filter determines a filter coefficient where error between a decoded image subjected to filtering and the original image becomes the minimum, for each slice on a decoded image, and subjects each coding unit included in this slice to filtering based on this filter coefficient. An encoding device and a decoding device which include such an adaptive filter can improve precision of a predicted image to be generated by referencing an image subjected to filtering by improving image quality of an encoded/decoded image using filtering, and accordingly, coding efficiency can be improved.
Also, the adaptive filter disclosed in NPL 2 can realize increase in speed of filter processing by performing filter processing with reference to a pixel value transferred to local memory which is local memory in which a target coding unit which is a processing target and an image in the vicinity thereof can be stored which can be accessed at high speed from frame memory of which the access speed is low which is frame memory in which pixel values of the entire frame can be stored.